
package IntegerBreak;
public class Solution {
    public int integerBreak(int n) {
       int[] result=new int[n+1];
       int[] f=new int[n+1];
       if (n==2) return 1;
       if (n==3) return 2;
       f[2]=2;
       f[3]=3;
       for (int i=4;i<=n;i++){
    	   f[i]=Math.max(f[i-2]*2, f[i-3]*3);
       }
       return f[n];
    }
    public static void main(String args[]) {
		Solution so=new IntegerBreak.Solution();
		System.out.println(so.integerBreak(9));
	}
}